<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://java.sun.com/jsf/composite"
	>

<ui:composition template="/WEB-INF/template/BasicTemplate.xhtml">
	<ui:define name="content">
	
	<br/><br/>
	<center> <h1>Socijalna mreza RAF </h1> </center>
		<div id="page-wrap">
		<div id="contact-area">
	
		<h:form id="forma" >
			<h:panelGrid columns="3">
				<h:outputText styleClass="outputLogReg" value="Name" ></h:outputText>
				<h:inputText styleClass="inputLogReg" value="#{regBean.username}" id="ime" required="true" requiredMessage="Username cannot be empty"  >
					<f:validator validatorId="VAL_USERNAME"> </f:validator>
				</h:inputText>
				<h:message styleClass="validatorError" for="ime"></h:message>
				
				<h:outputText styleClass="outputLogReg" value="Password"></h:outputText>
				<h:inputSecret styleClass="inputLogReg" value="#{regBean.password}" id="pass" required="true" requiredMessage="Password cannot be empty" ></h:inputSecret>
				<h:message styleClass="validatorError" for="pass" ></h:message>
			</h:panelGrid>
			
			<h:commandButton styleClass="loginBtn" value="Register" action="#{regBean.registerUser}" type="submit" id="btn" >
				
			</h:commandButton>
			
		</h:form>
		<h:outputLabel value="#{regBean.message}" styleClass="validatorOK" />
		
		</div>
		</div>
		
	</ui:define>

</ui:composition>
</html>